The invention relates to serial advanced technology attachment (SATA) devices, and more particularly, to a substitute SATA host and related method for communicating with a SATA device.
In the SATA protocol, a SATA host and a SATA device utilize Shadow Register Block registers to communicate with each other. The Shadow Register Block registers are registers used for delivering commands from the host to the device or for the device to inform the host of its current status. The host and the device exchange information through Frame Information Structures (FIS). Each FIS is composed of a group of Dwords, and the Dwords convey information between the host and the device.
According to the SATA specification, the host is restricted in the commands that it can send to the device until the reception of a good status or bad status indication from the device for clearing either the busy flag BSY or the data request flag DRQ of the device in the Shadow Register Block. Unless both of these flags have been cleared, the host can only send a device reset command or a software reset command to the device. Unfortunately, this means that the device is not able to receive other commands or data from the host until both the busy flag BSY and the data request flag DRQ have been cleared.
Typically, the host and the device transmit a series of Out of Band (OOB) signals for commencing communication between the host and the device. The device will then send a good status indicator to the host, which also has the effect of clearing the busy flag BSY and the data request flag DRQ. After this, normal communication between the host and the device can begin, with a series of FIS packets being exchanged between them.
One problem with the above situation is that the host is only able to send data to the device if the device has the proper firmware installed, and is capable of completing the OOB sequence and sending the good status indicator to the host. During mass production of SATA devices, the SATA devices do not originally have firmware written in their memories, such as flash memory. Therefore, when the host tries to write firmware to the flash memory of the device, the device is not able to complete the OOB sequence or submit the good status indicator to the host. Because of this, communication cannot begin between the host and the device, and the host is not able to write the firmware into the device's flash memory. In addition, there are other tasks that cannot be done if the device is not fully setup and does not have the firmware installed. For example, the device cannot perform a self-diagnostic, and therefore cannot send the good status indicator to the host.